//
//  userFourthTableViewCell.m
//  lmq
//
//  Created by 千翼网络科技 on 2017/1/17.
//  Copyright © 2017年 yuanxin. All rights reserved.
//

#import "userFourthTableViewCell.h"
#import "journalViewController.h"
#import "couponViewController.h"
#import "MyAndSnatchViewController.h"
#import "cooperationOrderViewController.h"
@implementation userFourthTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

        
        
        //财务日志
        self.orderButton=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, DEF_SCREEN_WIDTH, (44))];
        [self.orderButton addTarget:self action:@selector(cwButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.orderButton];
        UILabel *orderLabel=[[UILabel alloc]initWithFrame:CGRectMake((10), (14), (120), (16))];
        orderLabel.text=@"财务日志";
        orderLabel.textAlignment=NSTextAlignmentLeft;
        orderLabel.textColor=[ZJCModel colorWithString:@"222222"];
        [self.orderButton addSubview:orderLabel];
        UIImageView *youImageView=[[UIImageView alloc]initWithFrame:CGRectMake(DEF_SCREEN_WIDTH-(20), (15), (14), (14))];
        youImageView.image=[UIImage imageNamed:@"next"];
        [self.orderButton addSubview:youImageView];
        
        //线
        self.xianView=[[UIView alloc]initWithFrame:CGRectMake((10), (44), DEF_SCREEN_WIDTH-(10), (1))];
        self.xianView.backgroundColor=[ZJCModel colorWithString:@"f2f2f2"];
        [self addSubview:self.xianView];
        
        //夺宝
        
        self.snatchButton=[[UIButton alloc]initWithFrame:CGRectMake(0, 45, DEF_SCREEN_WIDTH, (44))];
        [self.snatchButton addTarget:self action:@selector(snatchButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.snatchButton];
        UILabel *orderLabel1=[[UILabel alloc]initWithFrame:CGRectMake((10), (14), (120), (16))];
        orderLabel1.text=@"积分抽奖";
        orderLabel1.textAlignment=NSTextAlignmentLeft;
        orderLabel1.textColor=[ZJCModel colorWithString:@"222222"];
        [self.snatchButton addSubview:orderLabel1];
        UIImageView *youImageView2=[[UIImageView alloc]initWithFrame:CGRectMake(DEF_SCREEN_WIDTH-(20), (15), (14), (14))];
        
        youImageView2.image=[UIImage imageNamed:@"next"];
        [self.snatchButton addSubview:youImageView2];
        
        //线
      UIView *xianView22=[[UIView alloc]initWithFrame:CGRectMake((10), (90), DEF_SCREEN_WIDTH-(10), (1))];
        xianView22.backgroundColor=[ZJCModel colorWithString:@"f2f2f2"];
        [self addSubview:xianView22];
        
        
        
        
        //优惠券
        self.yhqButton=[[UIButton alloc]initWithFrame:CGRectMake(0, (90), DEF_SCREEN_WIDTH, (44))];
        
        [self.yhqButton addTarget:self action:@selector(yhqButtonClick) forControlEvents:UIControlEventTouchUpInside];
        
        [self addSubview:self.yhqButton];
        UILabel *yhqLabel=[[UILabel alloc]initWithFrame:CGRectMake((10), (14), (120), (16))];
        yhqLabel.text=@"优惠券";
        yhqLabel.textAlignment=NSTextAlignmentLeft;
        yhqLabel.textColor=[ZJCModel colorWithString:@"222222"];
        [self.yhqButton addSubview:yhqLabel];
        UIImageView *youImageView1=[[UIImageView alloc]initWithFrame:CGRectMake(DEF_SCREEN_WIDTH-(20), (15), (14), (14))];
        youImageView1.image=[UIImage imageNamed:@"next"];
        [self.yhqButton addSubview:youImageView1];
        
        //线
        self.yhqView=[[UIView alloc]initWithFrame:CGRectMake((0), (90+44), DEF_SCREEN_WIDTH, 1)];
        self.yhqView.backgroundColor=[ZJCModel colorWithString:@"f2f2f2"];
        [self addSubview:self.yhqView];
        
        
        //商家订单
        self.buttonOfOrder=[[UIButton alloc]initWithFrame:CGRectMake(0, (134), DEF_SCREEN_WIDTH, (44))];
        
        [self.buttonOfOrder addTarget:self action:@selector(OrderButtonClick) forControlEvents:UIControlEventTouchUpInside];
        
        [self addSubview:self.buttonOfOrder];
        UILabel *OrderLabel=[[UILabel alloc]initWithFrame:CGRectMake((10), (14), (120), (16))];
        OrderLabel.text=@"商家订单";
        OrderLabel.textAlignment=NSTextAlignmentLeft;
        OrderLabel.textColor=[ZJCModel colorWithString:@"222222"];
        [self.buttonOfOrder addSubview:OrderLabel];
        UIImageView *OrderImageView1=[[UIImageView alloc]initWithFrame:CGRectMake(DEF_SCREEN_WIDTH-(20), (15), (14), (14))];
        OrderImageView1.image=[UIImage imageNamed:@"next"];
        [self.buttonOfOrder addSubview:OrderImageView1];
        
        //线
        self.viewOfOrder=[[UIView alloc]initWithFrame:CGRectMake((0), (135+44), DEF_SCREEN_WIDTH, (5))];
        self.viewOfOrder.backgroundColor=[ZJCModel colorWithString:@"f2f2f2"];
        [self addSubview:self.viewOfOrder];
        
        
        
    }
    return self;
}

-(void)cwButtonClick{
    journalViewController *journalVC=[[journalViewController alloc]init];
    journalVC.hidesBottomBarWhenPushed=YES;
    [((userViewController *)self.fourViewController).navigationController pushViewController:journalVC animated:YES];
}

-(void)yhqButtonClick{
    couponViewController *couponVC=[[couponViewController alloc]init];
    couponVC.hidesBottomBarWhenPushed=YES;
    [((userViewController *)self.fourViewController).navigationController pushViewController:couponVC animated:YES];
}
- (void)snatchButtonClick{

    MyAndSnatchViewController *MyAndSnatchVC=[[MyAndSnatchViewController alloc]init];
    MyAndSnatchVC.hidesBottomBarWhenPushed=YES;
    [((userViewController *)self.fourViewController).navigationController pushViewController:MyAndSnatchVC animated:YES];
    
    
}
- (void)OrderButtonClick{

    cooperationOrderViewController *cooperationOrderVC = [[cooperationOrderViewController alloc]init];
    cooperationOrderVC.hidesBottomBarWhenPushed = YES;
    [((userViewController *)self.fourViewController).navigationController pushViewController:cooperationOrderVC animated:YES];

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
